from idlelib.autocomplete import TRY_A

from openai import OpenAI

def main():
    client = OpenAI(api_key="sk-0abe9cefa35c4c84abec780685c8aed4",base_url="https://api.deepseek.com/v1")

    # Round 1
    messages = [{"role": "user", "content": "中国的哪座山最高?"}]
    response = client.chat.completions.create(
        model="deepseek-chat",
        messages=messages,
        stream=False
    )

    messages.append(response.choices[0].message)
    print(f"Messages Round 1: {messages}")

    # Round 2
    messages.append({"role": "user", "content": "第二高呢?"})
    response = client.chat.completions.create(
        model="deepseek-chat",
        messages=messages,
        stream=False
    )

    messages.append(response.choices[0].message)
    print(f"Messages Round 2: {messages}")

if __name__ == "__main__":
    main()


